import request from '../utils/request'

// 条件分页查询所有班级
export function cSelectAllClazzApi(name, degree, clazzId, page, pageSize)
{
  return request.get(`/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`)
}

// 添加班级
export function addStudentApi(student)
{
  return request.post(`/students`, student)
}

// 根据id删除学生
export function deleteStudentByIdApi(idSet)
{
  return request.delete(`/students/${idSet}`)
}

// 根据id查询学生
export function selectStudentByIdApi(id)
{
  return request.get(`/students/${id}`)
}

// 修改学生信息
export function updateStudentByIdApi(student)
{
  return request.put(`/students`, student)
}

// 违纪处理
export function vioStudentApi(id, score)
{
  return request.put(`/students/violation/${id}/${score}`, id, score)
}